//
//  ChooseNumCollectionCell.m
//  MoXiProject
//
//  Created by 沈晨宇 on 2017/7/10.
//  Copyright © 2017年 周筱雯. All rights reserved.
//

#import "ChooseNumCollectionCell.h"

@implementation ChooseNumCollectionCell


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self initUI];
    }
    return self;
}

#define iconHeight 80
-(void)initUI{
    
    self.iconImage=[UIImageView new];
    //    self.iconImage.backgroundColor=[UIColor redColor];
    [self.contentView addSubview:self.iconImage];
    
    self.name=[UILabel new];
    self.name.textColor=baseLightBlackColor;
    
    if (IPHONE5) {
        
        self.name.font=DEF_MyFont(15);
        
    }else{
        
        self.name.font=DEF_MyFont(17);
        
    }
    
    self.name.textAlignment=NSTextAlignmentCenter;
    [self.contentView addSubview:self.name];
    
    [self.iconImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(iconWeight);
        make.height.mas_equalTo(iconWeight);
        make.top.equalTo(self.contentView).with.offset(10);
        make.leading.equalTo(self.contentView).with.offset(10);
    }];
    
    [self.name mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(iconWeight+20);
        make.height.mas_equalTo(15);
        make.top.equalTo(self.iconImage.mas_bottom).with.offset(5);
        make.leading.equalTo(self.contentView).with.offset(0);
    }];
    
}

@end
